package cn.tedu.micro.demo.device.mapper;

import cn.tedu.micro.demo.device.po.GunInfoPO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * mybatis-plus框架中使用mapper接口 保证以下2点
 * 1. 单表操作CURD不需要自定义抽象方法,所有抽象方法继承父接口BaseMapper
 * 2. 一个mapper只能绑定一个表格gun_info 使用反向指向GunInfoPO
 */
@Mapper
public interface GunInfoMapper extends BaseMapper<GunInfoPO> {
    @Select("select * from gun_info where id=#{id}")
    GunInfoPO getById(Integer id);
}
